﻿using CommunityToolkit.Mvvm.ComponentModel;
using System.Xml.Linq;

namespace ymk_camera_surveillance.Models
{
    public class ObsCamera : ObservableObject
    {
        public enum CameraStatus
        {
            // 断开连接
            DISCONNECT = -2,

            // 打开失败
            OPEN_FAIL = -1,

            // 成功状态
            CONNECTED = 1,
            OPEN_SUCCESS = 2,

        }

        private int id = 0;
        private string name = "";
        private string rtspUrl = "";
        private CameraStatus state = CameraStatus.DISCONNECT;

        public int Id
        {
            get => id;
            set => SetProperty(ref id, value);
        }

        public string Name
        {
            get => name;
            set => SetProperty(ref name, value);
        }

        public string RtspUrl
        {
            get => rtspUrl;
            set => SetProperty(ref rtspUrl, value);
        }

        public CameraStatus State
        {
            get => state;
            set => SetProperty(ref state, value);
        }
    }
}
